package cn.pping.basic.service;

import cn.pping.basic.query.BaseQuery;
import cn.pping.basic.utils.PageList;

import java.util.List;

public interface IBaseService<T> {
    /*
     * @Title:
     * @Description: 查询所有
     * @Author: Pan
     * @Version: 1.0
     * @Date:  2022/6/21 19:25
     * @Parameters:
     * @Return
     */

    List<T> loadAll();

    /*
     * @Title:
     * @Description: 通过id查询
     * @Author: Pan
     * @Version: 1.0
     * @Date:  2022/6/21 19:26
     * @Parameters:
     * @Return
     */

    T loadById(Long id);

    /*
     * @Title:
     * @Description: 根据ID删除
     * @Author: Pan
     * @Version: 1.0
     * @Date:  2022/6/21 19:26
     * @Parameters:
     * @Return
     */

    void remove(Long id);

    /*
     * @Title:
     * @Description: 新增
     * @Author: Pan
     * @Version: 1.0
     * @Date:   19:26
     * @Parameters:
     * @Return
     */

    void save(T t);

    /*
     * @Title:
     * @Description: 修改
     * @Author: Pan
     * @Version: 1.0
     * @Date:  2022/6/21 19:27
     * @Parameters:
     * @Return
     */

    void update(T t);
    /*
     * @Title:
     * @Description: 高级查询
     * @Author: Pan
     * @Version: 1.0
     * @Date:  2022/6/21 19:27
     * @Parameters:
     * @Return
     */

    PageList<T> queryData(BaseQuery baseQuery);


    /**
     * @Title: 批量删除
     * @Description: TODO
     * @Author: Pan
     * @Version: 1.0
     * @Date:  2022/6/26 1:13
     * @Parameters: [ids]
     * @Return void
     */
    void batch(List<Long> ids);
}
